package com.hsmw.api.service;

import com.hsmw.api.mapper.HsmwExchangeBusMapper;
import com.hsmw.common.base.BaseService;
import com.hsmw.domain.HsmwExchangeBus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class HsmwExchangeBusService extends BaseService<HsmwExchangeBusMapper, HsmwExchangeBus> {

    @Autowired
    private HsmwExchangeBusMapper hsmwExchangeBusMapper;

    public void updateExchangeBusStatus(String ids) {

        hsmwExchangeBusMapper.updateExchangeBusStatus(ids);
    }

    public void updateExchangeBusAllStatus(String driverId) {

        hsmwExchangeBusMapper.updateExchangeBusAllStatus(driverId);
    }

    public void updateExBusStatus(String exchangeDriverId, String driverId) {
        hsmwExchangeBusMapper.updateExBusStatus(exchangeDriverId,driverId);
    }
}
